package com.tingfeng.demo01;

// 中介
public class Proxy implements Rent{

    private Host host;

    public Proxy() {
    }

    public Proxy(Host host) {
        this.host = host;
    }

    @Override
    public void rent() {
        // 以下是附属操作
        seeHouse();
        host.rent(); // 通过房东来调，房东是一个变量
        hetong();
        fare();
    }

    public void seeHouse(){
        System.out.println("中介带你看房");
    }
    public void hetong(){
        System.out.println("中介带你签合同");
    }
    public void fare(){
        System.out.println("收中介费");
    }
}
